package com.zelix;

import java.util.HashSet;
import javax.swing.*;
import javax.swing.text.JTextComponent;

abstract class h4 extends f4 {

    iu N;
    private static String M[];

    h4(iu iu1, it it, JList jlist, z2 z2, iy iy1) {
        super(it, z2);
        N = iu1;
        iy1.a(iu1, this, M[0]);
    }

    void a() {
        String s;
        int i;
        String s1;
        s = null;
        i = -1;
        s1 = super.B.getText().trim();
        if (!s1.equals(super.x))
            if (s1.length() > 0)
                s = s1;
            else
                new f2(super.z, M[6], M[5]);
        if (e()) {
//                    break label0;
            i = N.a();
            i &= a();
            int j = super.C.getSelectedIndex();
            if (j == super.b) {
                i |= 1;
            } else if (j == super.c) {
                i |= 4;
            } else if (j == super.d)
                i |= 2;
            if (super.E.isSelectedIndex(super.f))
                i |= 0x400;
            if (super.E.isSelectedIndex(super.g))
                i |= 8;
            if (super.E.isSelectedIndex(super.h))
                i |= 0x10;
            if (super.E.isSelectedIndex(super.i))
                i |= 0x20;
            if (super.E.isSelectedIndex(super.j))
                i |= 0x100;
            if (super.E.isSelectedIndex(super.k))
                i |= 0x40;
            if (super.E.isSelectedIndex(super.l))
                i |= 0x80;
        }
        if (s != null)
            try {
                c(s1);
            }
            catch (vb vb1) {
                new f2(super.z, M[6], vb1.getMessage());
            }
            catch (ac ac1) {
                new f2(super.z, M[6], ac1.getMessage());
            }
            catch (wb wb1) {
                new f2(super.z, M[6], wb1.getMessage());
            }
        if (i != -1)
            try {
                b(i);
            }
            catch (ac ac2) {
                new f2(super.z, M[6], ac2.getMessage());
            }
    }

    abstract void b(int i)
            throws ac;

    abstract void c(String s)
            throws vb, ac, wb;

    abstract int a();

    final boolean e() {
        return super.C.getSelectedIndex() != super.J || super.E.isSelectedIndex(super.f) != super.K.contains(super.o) || super.E.isSelectedIndex(super.g) != super.K.contains(super.p) || super.E.isSelectedIndex(super.h) != super.K.contains(super.q) || super.E.isSelectedIndex(super.i) != super.K.contains(super.r) || super.E.isSelectedIndex(super.j) != super.K.contains(super.s) || super.E.isSelectedIndex(super.k) != super.K.contains(super.t) || super.E.isSelectedIndex(super.l) != super.K.contains(super.u);
    }

    void f() {
        super.D.addElement(M[3]);
        super.D.addElement(M[2]);
        super.D.addElement(M[1]);
        super.D.addElement(M[4]);
    }

    void g() {
        super.b = 0;
        super.c = 1;
        super.d = 2;
        super.e = 3;
    }

    void h() {
    }

    public void b(gs gs, Object obj, Object obj1, Object obj2) {
//label0:
//        {
//            boolean flag;
//                flag = tb.b;
        if (obj == null || obj != null && (obj instanceof sx) && ((sx) obj).b() == 0) {
            super.x = N.u();
            super.A.setText(super.x);
            super.B.setText(super.x);
        }
        if (obj == null || (obj != null && obj instanceof sx && ((sx) obj).b() == 1)) {
//            break label0;
            super.K = new f1();
            if (N.C()) {
                super.C.setSelectedIndex(super.b);
                super.J = super.b;
            } else if (N.B()) {
                super.C.setSelectedIndex(super.c);
                super.J = super.c;
            } else if (N.A()) {
                super.C.setSelectedIndex(super.d);
                super.J = super.d;
            } else {
                super.C.setSelectedIndex(super.e);
                super.J = super.e;
            }
            if (N.x()) {
                if (!super.E.isSelectedIndex(super.f))
                    super.E.addSelectionInterval(super.f, super.f);
                super.K.add(super.o);
            } else if (super.E.isSelectedIndex(super.f))
                super.E.removeSelectionInterval(super.f, super.f);
            if (N.D()) {
                if (!super.E.isSelectedIndex(super.g))
                    super.E.addSelectionInterval(super.g, super.g);
                super.K.add(super.p);
            } else
                super.E.removeSelectionInterval(super.g, super.g);
            if (N.y()) {
                if (!super.E.isSelectedIndex(super.h))
                    super.E.addSelectionInterval(super.h, super.h);
                super.K.add(super.q);
            } else
                super.E.removeSelectionInterval(super.h, super.h);
            if (N.E()) {
                if (!super.E.isSelectedIndex(super.i))
                    super.E.addSelectionInterval(super.i, super.i);
                super.K.add(super.r);
            } else
                super.E.removeSelectionInterval(super.i, super.i);
            if (N.z()) {
                if (!super.E.isSelectedIndex(super.j))
                    super.E.addSelectionInterval(super.j, super.j);
                super.K.add(super.s);
            } else
                super.E.removeSelectionInterval(super.j, super.j);
            if (N.I()) {
                if (!super.E.isSelectedIndex(super.k))
                    super.E.addSelectionInterval(super.k, super.k);
                super.K.add(super.t);
            } else
                super.E.removeSelectionInterval(super.k, super.k);
            if (N.G()) {
                if (!super.E.isSelectedIndex(super.l))
                    super.E.addSelectionInterval(super.l, super.l);
                super.K.add(super.u);
            } else
                super.E.removeSelectionInterval(super.l, super.l);
        }
        h();
        super.G.a(super.E.getSelectedIndices());
        b();
        zz.b(super.B);
    }

    private static String z(char[] chs) {
        byte key = 0;
        for (int i = 0; i < chs.length; i++) {
            switch (i % 5) {
                case 0:
                    key = 0x61;
                    break;
                case 1:
                    key = 13;
                    break;
                case 2:
                    key = 67;
                    break;
                case 3:
                    key = 25;
                    break;
                case 4:
                    key = 30;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[7];
        as[0] = "%h0zR\b~7V|\022h1o{\023~";
        as[1] = "\021\177*o\177\025h";
        as[2] = "\021\177,m{\002y&}";
        as[3] = "\021x!uw\002";
        as[4] = "\021l r\177\006h";
        as[5] = "/l.|>\002l-wq\025-!|>\003a\"wu";
        as[6] = "$\1771vl";
        for (int i = 0; i < as.length; i++) {
            as[i] = z(as[i].toCharArray());
        }
        M = as;
    }
}